<div class="card" style="min-height:250px;">
  <div id="alarmLevelCountChart" style="width: 100%;height:300px;padding-top:10px;"></div> 
</div>
<script src="/echarts/echarts.common.min.js"></script>
<script type="text/javascript">
    Dcat.ready(function () {
        var alarmLevelCountChart = echarts.init(document.getElementById('alarmLevelCountChart'));
        var option;

        option = {
  title: {
    text: '报警级别',
    subtext: '',
    left: 'center'
  },
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'vertical',
    left: 'left'
  },
  series: [
    {
      name: '报警级别',
      type: 'pie',
      radius: '50%',
      data: {!! $data !!},
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
};

        option && alarmLevelCountChart.setOption(option);
    });
</script>